<template>
  <div>
    <Card>
      <div style="min-height: 730px">
        <Row>
          <Col span="2">
            <Row type="flex" align="middle">
              <Col span="2">
                <div class="nl-square"></div>
              </Col>
              <Col>稿件上报</Col>
            </Row>
          </Col>
        </Row>
        <!-- 稿件表单 -->
        <Form
          ref="ndForm"
          :model="ndForm"
          :rules="ndRuleForm"
          :label-width="110"
          style="margin-top:10px;"
        >
          <Row>
            <Col span="7">
              <FormItem label="新闻标题" prop="nd_title">
                <Input v-model="ndForm.nd_title" placeholder="输入新闻稿件标题"></Input>
              </FormItem>
            </Col>
          </Row>
          <Row>
            <Col span="7">
              <FormItem label="作者姓名" prop="nd_name">
                <Input v-model="ndForm.nd_name" placeholder="输入作者姓名"></Input>
              </FormItem>
            </Col>
          </Row>
          <Row>
            <Col span="7">
              <FormItem label="发布单位" prop="nd_issued">
                <Select v-model="ndForm.nd_issued" placeholder="选择发布单位">
                  <Option value="jinan">济南分行</Option>
                  <Option value="tianjin">天津分行</Option>
                  <Option value="beijing">北京分行</Option>
                </Select>
              </FormItem>
            </Col>
            
          </Row>
          <Row>
            <Col span="7">
              <FormItem label="新闻属性" prop="nd_news_attributes">
                <Row type="flex" justify="space-between">
                  <Select placeholder="请选择">
                    <Option value="dl1">人物访谈</Option>
                    <Option value="dl2">机构发展</Option>
                    <Option value="dl3">公司业务</Option>
                  </Select>
                </Row>
              </FormItem>
            </Col>
          </Row>
          <Row>
            <Col span="7">
              <FormItem label="发布媒体" prop="nd_media">
                <Select v-model="ndForm.nd_media" placeholder="选择发布媒体">
                  <Option value="fenghuang">凤凰网天津频道</Option>
                  <Option value="weibo">微博</Option>
                </Select>
              </FormItem>
            </Col>
            <Col span="7" push="1">
              <FormItem label="预计发布日期" prop="nd_estimated_time">
                <DatePicker type="date" placeholder="选择预计发布日期" v-model="ndForm.nd_estimated_time"></DatePicker>
              </FormItem>
            </Col>
          </Row>
          <Row>
            <Col span="15">
              <FormItem label="内容摘要" prop="nd_abstract">
                <Input
                  v-model="ndForm.nd_abstract"
                  type="textarea"
                  :autosize="{minRows: 5,maxRows: 7}"
                  placeholder="输入内容"
                ></Input>
              </FormItem>
            </Col>
          </Row>
          <FormItem>
            <Button type="primary" @click="handleSubmit('ndForm')">暂存</Button>
            <Button type="success" @click="handleReset('ndForm')" style="margin-left: 8px">保存并提交</Button>
          </FormItem>
        </Form>
      </div>
    </Card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      //表单数据
      ndForm: {
        nd_title: "",
        nd_name: "",
        nd_issued: "",
        nd_news_attributes: [],
        nd_media: "",
        nd_estimated_time: "",
        nd_release_time: "",
        nd_release_date: "",
        nd_same_report: "",
        nd_reprinted: "",
        nd_quality_analysis: "",
        nd_abstract: "",
        nd_word_count: "",
        nd_score: ""
      },
      ndRuleForm: {
        nd_title: [
          { required: true, message: "请输入稿件标题", trigger: "blur" }
        ],
        nd_name: [
          { required: true, message: "请输入作者姓名", trigger: "blur" }
        ],
        nd_issued: [{ required: true }],
        nd_news_attributes: [{ required: true }],
        nd_media: [{ required: true }],
        nd_estimated_time: [{ required: true }],
        nd_release: [{ required: true }],
        nd_same_report: [{ required: true }],
        nd_reprinted: [{ required: true }],
        nd_quality_analysis: [{ required: true }],
        nd_abstract: [{ required: true }],
        nd_word_count: [{ required: true }],
        nd_score: [{ required: true }]
      }
    };
  },
  methods: {}
};
</script>

<style scoped>
.send-news {
  margin-bottom: 10px;
}
.nl-square {
  width: 3px;
  height: 13px;
  background: #3431ec;
}
</style>
